<!--
  Generated template for the CloseAccountTabPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
    <ion-navbar>
        <ion-title>
            结算信息
        </ion-title>
    </ion-navbar>
</ion-header>
<!--<div style="width: 100%;height: 0.6rem;background-color: #F7F7F7"></div>-->
<ion-content >
    <div  style="margin: 0 auto;width: 95%" *ngFor="let item of list; let i=index">
        <ion-item>
            <ion-label>结算方式</ion-label>
            <ion-select okText="确定" cancelText="取消" [(ngModel)]="item.option"
                        style="height:45px;" placeholder="请选择">
                    <ion-option *ngFor="let typeData of payWayList" value="{{typeData?.BianMa}}">{{typeData?.MingCheng}}</ion-option>
            </ion-select>
        </ion-item>
        <ion-item>
            <ion-label>结算金额</ion-label>
            <ion-input type="number" placeholder="请填写结算金额" [(ngModel)]="item.feeLabel"></ion-input>
        </ion-item>

        <div *ngIf="item.option=='3'">
            <ion-item *ngFor="let zzitem of zzList;let zzi=index">
                <ion-label>{{zzitem.Text}}</ion-label>
                <ion-input [type]="zzitem.DataTYPE" [(ngModel)]="item.zzLabel[zzi].Value"></ion-input>
            </ion-item>
        </div>
        <div *ngIf="item.option=='4'">
            <div *ngFor="let gwkitem of gwkList;let gwkId=index">
                <ion-item *ngIf="gwkitem.DataTYPE =='string'">
                    <ion-label>{{gwkitem.Text}}</ion-label>
                    <ion-input [type]="gwkitem.DataTYPE" *ngIf="item.DataTYPE !='date'" [(ngModel)]="item.gwkLabel[gwkId].Value"></ion-input>
                </ion-item>
                <ion-item *ngIf="gwkitem.DataTYPE =='date'">
                    <ion-label>{{gwkitem.Text}}</ion-label>
                    <ion-datetime   displayFormat="YYYY-MM-DD" cancelText="取消" doneText="确定" [(ngModel)]="item.gwkLabel[gwkId].Value"></ion-datetime>
                    <img  src="assets/imgs/icon_time.png" item-end class="date-img">
                </ion-item>
            </div>

        </div>
        <div class="btn">
            <div (click)="addHandler(item)" *ngIf="(list.length-1)==i">
                <img src="./assets/imgs/icon_edit.png">
                <span >增加</span>
            </div>
            <div (click)="deleteHandler(item,i)">
                <img src="./assets/imgs/icon_del.png">
                <span >删除</span>
            </div>
        </div>
    </div>

    <div class="buttonDiv" tappable  (click)="complete()">
        <button ion-button>完成</button>
    </div>
</ion-content>

